package com.yanqu.road.entity.player;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_invited_data")
public class UserShareData extends DataObject {
    @FieldTypeAnnotation(select = true,update = true)
    private long userId;
    @FieldTypeAnnotation
    private String shareCode;
    @FieldTypeAnnotation
    private int todayShareTimes;
    @FieldTypeAnnotation
    private long nextShareTime;
    @FieldTypeAnnotation
    private long lastResetTime;
    @FieldTypeAnnotation
    private int invitedServerId;
    @FieldTypeAnnotation
    private long invitedUserId;
    @FieldTypeAnnotation
    private String invitedCode;
    @FieldTypeAnnotation
    private long nextInvitationTime;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (!Objects.equals(this.userId, userId)) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public String getShareCode() {
        return shareCode;
    }

    public void setShareCode(String shareCode) {
        if (!Objects.equals(this.shareCode, shareCode)) {
            this.shareCode = shareCode;
            setUpdateOption();
        }
    }

    public int getTodayShareTimes() {
        return todayShareTimes;
    }

    public void setTodayShareTimes(int todayShareTimes) {
        if (!Objects.equals(this.todayShareTimes, todayShareTimes)) {
            this.todayShareTimes = todayShareTimes;
            setUpdateOption();
        }
    }

    public long getNextShareTime() {
        return nextShareTime;
    }

    public void setNextShareTime(long nextShareTime) {
        if (!Objects.equals(this.nextShareTime, nextShareTime)) {
            this.nextShareTime = nextShareTime;
            setUpdateOption();
        }
    }

    public long getLastResetTime() {
        return lastResetTime;
    }

    public void setLastResetTime(long lastResetTime) {
        if (!Objects.equals(this.lastResetTime, lastResetTime)) {
            this.lastResetTime = lastResetTime;
            setUpdateOption();
        }
    }

    public int getInvitedServerId() {
        return invitedServerId;
    }

    public void setInvitedServerId(int invitedServerId) {
        if (!Objects.equals(this.invitedServerId, invitedServerId)) {
            this.invitedServerId = invitedServerId;
            setUpdateOption();
        }
    }

    public long getInvitedUserId() {
        return invitedUserId;
    }

    public void setInvitedUserId(long invitedUserId) {
        if (!Objects.equals(this.invitedUserId, invitedUserId)) {
            this.invitedUserId = invitedUserId;
            setUpdateOption();
        }
    }

    public String getInvitedCode() {
        return invitedCode;
    }

    public void setInvitedCode(String invitedCode) {
        if (!Objects.equals(this.invitedCode, invitedCode)) {
            this.invitedCode = invitedCode;
            setUpdateOption();
        }
    }

    public long getNextInvitationTime() {
        return nextInvitationTime;
    }

    public void setNextInvitationTime(long nextInvitationTime) {
        if (!Objects.equals(this.nextInvitationTime, nextInvitationTime)) {
            this.nextInvitationTime = nextInvitationTime;
            setUpdateOption();
        }
    }

}
